import 'package:flutter/material.dart';

/// 2022年更新  适配 flutter 3.0
class ScaffoldPage02 extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return ScaffoldPage02State();
  }
}

class ScaffoldPage02State extends State with SingleTickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      ///定义页面的标题
      appBar: AppBar(
        title: Text("这里是首页"),
      ),
      ///定义的页面的主体内容
      body:Text(""),
      ///左侧拉菜单页面
      drawer: Container(
        color: Colors.grey,
        width: 120,
        // child: FlatButton(
        //   child: Text("关闭左滑菜单"),
        //   onPressed: () {
        //     Navigator.of(context).pop();
        //   },
        // ),
      ),
      ///右侧拉菜单页面
      endDrawer: Container(
        color: Colors.yellow,
        width: 200,
        height: 800,
        // child: FlatButton(
        //   child: Text("关闭右滑菜单"),
        //   onPressed: () {
        //     Navigator.of(context).pop();
        //   },
        // ),
      ),
    );
  }
}
